<template>
  <DetailPage v-bind="DetailConfig" :model="nowData"></DetailPage>
</template>

<script setup lang="ts">
import { getAreaObj } from '@/utils/util'
import DetailPage from '@/views/aplid/DetailPage/index.vue'
import { DetailConfig } from '@/views/datacenter/basicData/serviceOrg/components/config'

const nowRowData: any = inject('nowRowData')
const nowData: any = ref({})
const getInitData = () => {
  const baseData = nowRowData.value.dpServiceOrgBaseFile||{}
		const areaNames: any = getAreaObj(baseData, '', 'set')
		const nowAreaObj: any = getAreaObj(baseData, 'now', 'set')
		nowData.value = {
			...baseData,
			areas_name: areaNames.names,
			nowAreasNames: nowAreaObj.names,
		}
}

onMounted(() => {
	getInitData()
})
</script>

<style scoped>
.detail-label {
	color: #eee;
}

.image {
	width: 90%;
	height: 220px;
	display: block;
}
</style>
